package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 租房表
 * @author ZhuanZ（无密码）
 * @since 2025-01-18
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "TenancyRoom", description = "租房表")
@TableName("fc_tenancy_room")
public class TenancyRoom extends BaseEntity {

    /** 租房ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId
    private Long id;

    /** 用户ID */
    @NotNull(message = "用户ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "用户ID")
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    /** 校区ID */
    @NotNull(message = "校区ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "校区ID")
    @ApiModelProperty(value = "校区ID")
    private Long campusId;

    /** 楼栋ID */
    @NotNull(message = "楼栋ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "楼栋ID")
    @ApiModelProperty(value = "楼栋ID")
    private Long buildingId;

    /** 单元ID */
    @NotNull(message = "单元ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "单元ID")
    @ApiModelProperty(value = "单元ID")
    private Long unitId;

    /** 楼层ID */
    @NotNull(message = "楼层ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "楼层ID")
    @ApiModelProperty(value = "楼层ID")
    private Long floorId;

    /** 房间ID */
    @NotNull(message = "房间ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "房间ID")
    @ApiModelProperty(value = "房间ID")
    private Long roomId;

    /** 付费方式(0-月付 1-季付 2-半年付 3-年付 4-其他) */
    @NotNull(message = "付费方式(0-月付 1-季付 2-半年付 3-年付 4-其他)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "付费方式(0-月付 1-季付 2-半年付 3-年付 4-其他)")
    @ApiModelProperty(value = "付费方式(0-月付 1-季付 2-半年付 3-年付 4-其他)")
    private Integer payWay;

    /** 已交租金 */
    @NotBlank(message = "已交租金不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "已交租金")
    @ApiModelProperty(value = "已交租金")
    private String alreadyPay;

    /** 待交租金 */
    @NotBlank(message = "待交租金不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "待交租金")
    @ApiModelProperty(value = "待交租金")
    private String waitPay;

    /** 租房方式(0-整租 1-合租) */
    @NotNull(message = "租房方式(0-整租 1-合租)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "租房方式(0-整租 1-合租)")
    @ApiModelProperty(value = "租房方式(0-整租 1-合租)")
    private Integer tenancyWay;

    /** 合租ID */
    @ExcelProperty(value = "合租ID")
    @ApiModelProperty(value = "合租ID")
    private Long leaseId;

    /** 合同ID */
    @ExcelProperty(value = "合同ID")
    @ApiModelProperty(value = "合同ID")
    private Long contractId;

    /** 合同编号 */
    @ExcelProperty(value = "合同编号")
    @ApiModelProperty(value = "合同编号")
    private String contractCode;

    /** 租房状态(0-审核中 1-待签合同 2-待缴费 3-已入住 4-待续租 9-已拒绝) */
    @NotNull(message = "租房状态(0-审核中 1-待签合同 2-待缴费 3-已入住 4-待续租 9-已拒绝)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "租房状态(0-审核中 1-待签合同 2-待缴费 3-已入住 4-待续租 9-已拒绝)")
    @ApiModelProperty(value = "租房状态(0-审核中 1-待签合同 2-待缴费 3-已入住 4-待续租 9-已拒绝)")
    private Integer tenancyState;

    /** 续租状态(0-待入住 1-待申请 2-待审核 3-已入住 9-已拒绝) */
    @NotNull(message = "续租状态(0-待入住 1-待申请 2-待审核 3-已入住 9-已拒绝)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "续租状态(0-待入住 1-待申请 2-待审核 3-已入住 9-已拒绝)")
    @ApiModelProperty(value = "续租状态(0-待入住 1-待申请 2-待审核 3-已入住 9-已拒绝)")
    private Integer continueState;

    /** 拒绝理由 */
    @ExcelProperty(value = "拒绝理由")
    @ApiModelProperty(value = "拒绝理由")
    private String refuseReason;

    /** 申请时间 */
    @NotNull(message = "申请时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "申请时间")
    @ApiModelProperty(value = "申请时间")
    private LocalDateTime applyTime;

    /** 审核时间 */
    @ExcelProperty(value = "审核时间")
    @ApiModelProperty(value = "审核时间")
    private LocalDateTime examineTime;

    /** 合同签约时间 */
    @ExcelProperty(value = "合同签约时间")
    @ApiModelProperty(value = "合同签约时间")
    private LocalDateTime signContractTime;

    /** 初次缴费时间 */
    @ExcelProperty(value = "初次缴费时间")
    @ApiModelProperty(value = "初次缴费时间")
    private LocalDateTime firstPayTime;

    /** 入住时间 */
    @ExcelProperty(value = "入住时间")
    @ApiModelProperty(value = "入住时间")
    private LocalDateTime moveTime;

    /** 到租时间 */
    @ExcelProperty(value = "到租时间")
    @ApiModelProperty(value = "到租时间")
    private LocalDateTime endTime;

    /** 附件 */
    @ExcelProperty(value = "附件")
    @ApiModelProperty(value = "附件")
    private String attachment;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 乐观锁 */
    @NotNull(message = "乐观锁不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
